
<html>
<script src="../../resources/js-test.js"></script>
<body style="min-width: 5000px; min-height: 5000px">
<script>
description('Checks that the popstate event fires when dispatched via createEvent');

onpopstate = function(event)
{
    if(!!event.state && !!event.state.testValue)
    {
        testPassed('Popstate state: (' + event.state.testValue +')');
    }
}

onload = function()
{
    var evt = new PopStateEvent('popstate', {
            bubbles: false,
            cancelable: false,
            state: { testValue: 'Success' }
        });
    window.dispatchEvent(evt);
}

setTimeout(finishJSTest, 500);
var jsTestIsAsync = true;
</script>
</body>
</html>
